<template>
    <div class="y-card">
        <div class="y-card-header">
            <div class="y-card-header-title">{{ title }}</div>
        </div>
        <el-row :gutter="20" class="y-card-content">
            <el-col v-for="item of items" :key="item.title" :span="span" class="y-card-content-col">
                <div class="y-card-content-item"></div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    props: {
        title: {
            type: String,
            require: true
        },
        span: {
            type: Number,
            default: 6
        },
        items: {
            type: Array,
            default: () => []
        }
    }
}
</script>

<style lang="less" scoped>
.y-card {
    border-radius: 4px;
    background: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
    .y-card-header {
        height: 30px;
        display: flex;
        align-items: center;
        padding: 0 20px;
        font-size: 13px;
        .y-card-header-title {
        }
    }
    .y-card-content {
        padding: 25px;
        .y-card-content-item {
            height: 50px;
            background-color: red;
        }
        .y-card-content-col {
            margin-bottom: 20px;
        }
    }
}
</style>
